num=int(input())
wan=num//10000
qian=num//1000%10
bai=num//100%10
shi=num//10%10
ge=num//1%10
print(wan,qian,bai,shi,ge)
